package com.yuzhi.master.sewageTreatment.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuzhi.common.core.mapper.BaseMapperPlus;
import com.yuzhi.master.sewageTreatment.entity.DrainEngPhotoatta;
import com.yuzhi.master.sewageTreatment.entity.SwageTreatmentEntity;
import com.yuzhi.master.sewageTreatment.entity.SwageTreatmentEntityVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface SewageTreatmentMapper extends BaseMapperPlus<SewageTreatmentMapper, SwageTreatmentEntity, SwageTreatmentEntityVo>  {

    /**
     * 分页查询污水处理厂信息
     * @param page 分页对象
     * @param factName 污水厂名称
     * @param area_code 区域代码
     * @return 分页结果
     */
    Page<SwageTreatmentEntity> selectByCondition(
            @Param("page") Page<SwageTreatmentEntity> page,
            @Param("factName") String factName,
            @Param("area_code") String area_code
    );

    /**
     * 根据ID更新污水处理厂信息
     * @param entity 待更新的实体
     * @return 影响的行数
     */
    int updateById(@Param("entity") SwageTreatmentEntity entity);

    /**
     * 查询所有污水处理厂基础信息
     * @param id 主键
     * @return 污水处理厂基础信息列表
     */
    SwageTreatmentEntity selectById(@Param("id") String id);



    DrainEngPhotoatta selectPhotoByGdzpId(@Param("gdzpId") String gdzpId);
    int updatePlantPhoto(@Param("photo") DrainEngPhotoatta photo);



    int savePoint(@Param("id") String id, @Param("coordinates") List<List<Double>> coordinates);
}
